package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.YonbipCashflowcaseMapper;
import com.ruoyi.system.domain.YonbipCashflowcase;
import com.ruoyi.system.service.IYonbipCashflowcaseService;
import com.ruoyi.common.core.text.Convert;

/**
 * 现金流量科目查询Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-16
 */
@Service
public class YonbipCashflowcaseServiceImpl implements IYonbipCashflowcaseService 
{
    @Autowired
    private YonbipCashflowcaseMapper yonbipCashflowcaseMapper;

    /**
     * 查询现金流量科目查询
     * 
     * @param pkDetail 现金流量科目查询主键
     * @return 现金流量科目查询
     */
    @DataSource(DataSourceType.SLAVE)
    @Override
    public YonbipCashflowcase selectYonbipCashflowcaseByPkDetail(String pkDetail)
    {
        return yonbipCashflowcaseMapper.selectYonbipCashflowcaseByPkDetail(pkDetail);
    }

    /**
     * 查询现金流量科目查询列表
     * 
     * @param yonbipCashflowcase 现金流量科目查询
     * @return 现金流量科目查询
     */
    @Override
    public List<YonbipCashflowcase> selectYonbipCashflowcaseList(YonbipCashflowcase yonbipCashflowcase)
    {
        return yonbipCashflowcaseMapper.selectYonbipCashflowcaseList(yonbipCashflowcase);
    }

    /**
     * 新增现金流量科目查询
     * 
     * @param yonbipCashflowcase 现金流量科目查询
     * @return 结果
     */
    @Override
    public int insertYonbipCashflowcase(YonbipCashflowcase yonbipCashflowcase)
    {
        return yonbipCashflowcaseMapper.insertYonbipCashflowcase(yonbipCashflowcase);
    }

    /**
     * 修改现金流量科目查询
     * 
     * @param yonbipCashflowcase 现金流量科目查询
     * @return 结果
     */
    @Override
    public int updateYonbipCashflowcase(YonbipCashflowcase yonbipCashflowcase)
    {
        return yonbipCashflowcaseMapper.updateYonbipCashflowcase(yonbipCashflowcase);
    }

    /**
     * 批量删除现金流量科目查询
     * 
     * @param pkDetails 需要删除的现金流量科目查询主键
     * @return 结果
     */
    @Override
    public int deleteYonbipCashflowcaseByPkDetails(String pkDetails)
    {
        return yonbipCashflowcaseMapper.deleteYonbipCashflowcaseByPkDetails(Convert.toStrArray(pkDetails));
    }

    /**
     * 删除现金流量科目查询信息
     * 
     * @param pkDetail 现金流量科目查询主键
     * @return 结果
     */
    @Override
    public int deleteYonbipCashflowcaseByPkDetail(String pkDetail)
    {
        return yonbipCashflowcaseMapper.deleteYonbipCashflowcaseByPkDetail(pkDetail);
    }
}
